import { http } from "@/utils/http";
import { baseUrlApi, filerEmptyVal } from "../utils";

/** 列表查询 */
export const getResearchList = (params?: object) => {
  return http.request<any>("get", baseUrlApi("/research/team/page"), {
    params: filerEmptyVal(params)
  });
};

/** 详情 */
export const getResearchDetail = (params?: object) => {
  return http.request<any>("get", baseUrlApi("/research/team/detail"), {
    params: filerEmptyVal(params)
  });
};

/** 新增 */
export const addResearch = (data?: object) => {
  return http.request<any>("post", baseUrlApi("/research/team/add"), {
    data: filerEmptyVal(data)
  });
};

/** 审核 */
export const checkResearch = (data?: object) => {
  return http.request<any>("post", baseUrlApi("/research/team/examineStatus"), {
    data: filerEmptyVal(data)
  });
};

/** 修改 */
export const upResearch = (data?: object) => {
  return http.request<any>("post", baseUrlApi("/research/team/update"), {
    data
  });
};

/** 删除 */
export const delResearch = (dataId?: number) => {
  return http.request<any>(
    "post",
    baseUrlApi("/research/team/delete?id=" + dataId)
  );
};
